package test13;

public class IsKindergarten {
        private int age;

        public IsKindergarten(){}

        public IsKindergarten(int age){
            this.age = age;
        }

        public int GetAge(){return age;}

        public void SetAge(int age){this.age = age;}

        public void ifGarten(){
            if(age==2||age==3){
                System.out.printf("孩子年龄是%d岁孩子应该上小班\n",age);
            } else if (age==4) {
                System.out.printf("孩子年龄是%d岁孩子应该上中班\n",age);
            } else if (age==5) {
                System.out.printf("孩子年龄是%d岁孩子应该上大班班\n",age);
            } else if (age==6) {
                System.out.printf("孩子年龄是%d岁孩子应该上学前班\n",age);
            }else {
                System.out.printf("孩子年龄是%d岁，太大或者太小，不宜上幼儿园\n",age);
            }
        }
}
